#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import estop
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.estop(id_num=data.id_num)
    rospy.loginfo("estop_node")


def listener():
    rospy.init_node("estop", anonymous=True)
    rospy.Subscriber("estop", estop, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

